package com.education.online.service.impl;


import com.education.common.utils.Convert;
import com.education.online.mapper.OUserLiveMapper;
import com.education.online.pojo.OUserLive;
import com.education.online.service.OUserLiveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户收藏职达人视频表
 服务层实现
 *
 * @author d
 * @date 2020-06-08 10:26:18
 */
@Service
public class OUserLiveServiceImpl implements OUserLiveService {

    @Autowired
    private OUserLiveMapper oUserLiveMapper;

    //查询用户收藏职达人视频表
    @Override
    public OUserLive selectOUserLiveById(Integer id) {
        return oUserLiveMapper.selectOUserLiveById(id);
    }

    // 查询用户收藏职达人视频表
    @Override
    public List<OUserLive> selectOUserLiveList(OUserLive oUserLive) {
        return oUserLiveMapper.selectOUserLiveList(oUserLive);
    }

    // 新增用户收藏职达人视频表
    @Override
    public int insertOUserLive(OUserLive oUserLive) {
        return oUserLiveMapper.insertOUserLive(oUserLive);
    }

    @Override
    public int deleteOUserLiveByUserIdAndLiveId(Integer userId, Integer liveId) {
        return oUserLiveMapper.deleteOUserLiveByUserIdAndLiveId(userId,liveId);
    }

    //修改用户收藏职达人视频表
    @Override
    public int updateOUserLive(OUserLive oUserLive) {
        return oUserLiveMapper.updateOUserLive(oUserLive);
    }

    //删除用户收藏职达人视频表
    @Override
    public int deleteOUserLiveByIds(String ids) {
        return oUserLiveMapper.deleteOUserLiveByIds(Convert.toStrArray(ids));
    }
}